package jmu.edu.yjc.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jmu.edu.yjc.domain.entity.UserRole;
import jmu.edu.yjc.mapper.UserRoleMapper;
import jmu.edu.yjc.service.UserRoleService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 用户和角色关联表(UserRole)表服务实现类
 *
 * @author makejava
 * @since 2023-01-19 16:45:32
 */
@Service("userRoleService")
public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> implements UserRoleService {

    @Override
    public List<Long> selectUserRoleByUserId(Long userId) {
        return baseMapper.selectUserRoleByUserId(userId);
    }

    @Override
    public void deleteUserRoleByUserId(Long id) {
        baseMapper.deleteUserRoleByUserId(id);
    }
}
